package com.company.creational.abstract_factory_pattern.client;

import com.company.creational.abstract_factory_pattern.factory.SkinFactory;
import com.company.creational.abstract_factory_pattern.factory.SpringSkinFactory;
import com.company.creational.abstract_factory_pattern.product.button.Button;
import com.company.creational.abstract_factory_pattern.product.combobox.ComboBox;
import com.company.creational.abstract_factory_pattern.product.textfield.TextField;

/**
 * @ClassName Client
 * @Author tiezheng.han
 * @Date 2020/8/27 10:38
 **/
public class Client {

    public static void main(String[] args) {
        // 使用抽象层定义
        SkinFactory skinFactory;
        Button button;
        TextField textField;
        ComboBox comboBox;
        skinFactory = new SpringSkinFactory();
//        skinFactory = new SummerSkinFactory();
        button = skinFactory.createButton();
        textField = skinFactory.createTextFiled();
        comboBox = skinFactory.createComboBox();
        button.display();
        textField.display();
        comboBox.display();
    }
}
